import axios from "axios";

/*export function request(config) {
  return new Promise((resolve, reject) => {
    const instance = axios.create({
      baseURL: 'http://8.136.157.194:8000',
      timeout: 5000
    })
    instance(config).then(res => {
      resolve(res)
    })
        .catch(err => {
          reject(err)
        })
  })
}*/

/*export function request(config) {
  return new Promise((resolve, reject) => {
    const instance = axios.create({
      baseURL: 'https://paas-edu.bktencent.com/o/bai-volunteer',
      timeout: 5000
    })
    instance(config).then(res => {
      resolve(res)
    })
        .catch(err => {
          reject(err)
        })
  })
}*/

export function request(config) {
  return new Promise((resolve, reject) => {
    const instance = axios.create({
      baseURL: 'http://localhost:8000',
      timeout: 5000
    })
    instance(config).then(res => {
      resolve(res)
    })
        .catch(err => {
          reject(err)
        })
  })
}
